﻿using System;

namespace HslCommunication.Reflection
{
	/// <summary>
	/// 可以指定方法变成对外公开的API接口，如果方法不实现该特性，将不对外公开方法，无法获取相关的接口权限<br />
	/// You can specify the method to become an externally public API interface. If the method does not implement this feature, 
	/// the method will not be publicly disclosed, and the related interface permissions cannot be obtained
	/// </summary>
	// Token: 0x0200010C RID: 268
	[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false)]
	public class HslMqttApiAttribute : Attribute
	{
		/// <summary>
		/// 当前指定的ApiTopic信息，如果当前的方法接口不指定别名，那么就使用当前的方法名称<br />
		/// The currently specified ApiTopic information, if the current method interface does not specify an alias, 
		/// then the current method name is used
		/// </summary>
		// Token: 0x17000510 RID: 1296
		// (get) Token: 0x060017A2 RID: 6050 RVA: 0x0007875B File Offset: 0x0007695B
		// (set) Token: 0x060017A3 RID: 6051 RVA: 0x00078763 File Offset: 0x00076963
		public string ApiTopic { get; set; }

		/// <summary>
		/// 当前方法的注释内容<br />
		/// The comment content of the current method
		/// </summary>
		// Token: 0x17000511 RID: 1297
		// (get) Token: 0x060017A4 RID: 6052 RVA: 0x0007876C File Offset: 0x0007696C
		// (set) Token: 0x060017A5 RID: 6053 RVA: 0x00078774 File Offset: 0x00076974
		public string Description { get; set; }

		/// <summary>
		/// 当前的属性是否需要展开API信息，默认不展开
		/// </summary>
		// Token: 0x17000512 RID: 1298
		// (get) Token: 0x060017A6 RID: 6054 RVA: 0x0007877D File Offset: 0x0007697D
		// (set) Token: 0x060017A7 RID: 6055 RVA: 0x00078785 File Offset: 0x00076985
		public bool PropertyUnfold { get; set; } = false;

		/// <summary>
		/// 如果当前的API接口是支持Http的请求方式，当前属性有效，例如GET,POST
		/// </summary>
		// Token: 0x17000513 RID: 1299
		// (get) Token: 0x060017A8 RID: 6056 RVA: 0x0007878E File Offset: 0x0007698E
		// (set) Token: 0x060017A9 RID: 6057 RVA: 0x00078796 File Offset: 0x00076996
		public string HttpMethod { get; set; } = "POST";

		/// <summary>
		/// 指定描述内容来实例化一个的对象
		/// </summary>
		/// <param name="description">当前接口的描述信息</param>
		// Token: 0x060017AA RID: 6058 RVA: 0x0007879F File Offset: 0x0007699F
		public HslMqttApiAttribute(string description)
		{
			this.Description = description;
		}

		/// <summary>
		/// 指定描述内容来实例化一个的对象
		/// </summary>
		/// <param name="apiTopic">指重新定当前接口的路由信息</param>
		/// <param name="description">当前接口的描述信息</param>
		// Token: 0x060017AB RID: 6059 RVA: 0x000787C3 File Offset: 0x000769C3
		public HslMqttApiAttribute(string apiTopic, string description)
		{
			this.ApiTopic = apiTopic;
			this.Description = description;
		}

		/// <summary>
		/// 实例化一个默认的对象
		/// </summary>
		// Token: 0x060017AC RID: 6060 RVA: 0x000787EF File Offset: 0x000769EF
		public HslMqttApiAttribute()
		{
		}
	}
}
